package org.zcl.service.account;

import lombok.extern.slf4j.Slf4j;
import org.zcl.entity.response.ChannelResponse;
import org.zcl.service.PayService;

/**
 * <p>
 *     支付
 * </p>
 *
 * @author Chenglin Zhu
 * @since 2022-08-03 16:35:15
 */
@Slf4j
public abstract class AbstractAccountService<T> implements PayService<T> {


    public ChannelResponse applyPay(T t) {
        ChannelResponse channelResponse = new ChannelResponse();
        try {
            log.info("调用积分支付请求参数:{}",t);
            channelResponse = doApplyPay(t);
        } catch (Exception e) {
            log.error("调用积分支付出现异常", e);
        }
        return channelResponse;

    }

    protected abstract ChannelResponse doApplyPay(T t);


}
